import { createStore, applyMiddleware } from 'redux'
// 此库不是必须的,但是用它,可以让我们多个redux模块,统一为immutable对象
import { combineReducers } from 'redux-immutable'
// 中间件
import thunk from 'redux-thunk'
import { composeWithDevTools } from '@redux-devtools/extension'

import num from '@/reducer/num'
import film from '@/reducer/film'

const reducer = combineReducers({
  num,
  film
})

const store = createStore(reducer, composeWithDevTools(applyMiddleware(thunk)))

export default store
